<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:19:11
 * @Description: 门店评分表
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-20 09:21:52
 * @FilePath: /归档/user/2021_10_19_101911_create_shop_sorce.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopSorce extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_sorces', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('shop_id')->comment('店铺ID');
            $table->float('service_score', 8,2)->default(0)->comment('服务评分');
            $table->float('good_score', 8,2)->default(0)->comment('商品评分');
            $table->float('ship_score', 8,2)->default(0)->comment('物流评分');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_sorces');
    }
}
